﻿@using SmartStore.Admin.Models.DataExchange;
@model ImportProfileModel
@{
	var title = string.Concat(T("Common.Profile"), " - ", T("Admin.Common.Edit"));
	ViewBag.Title = title;
}

@using (Html.BeginForm())
{
	<fieldset>
		<div class="section-header">
			<div class="title">
				<i class="fa fa-download"></i>
				@title - @Model.Name @Html.ActionLink("(" + T("Admin.Common.BackToList") + ")", "List")
			</div>
			<div class="options">
				@if (Model.Id != 0)
                {
					<button type="button" id="ProfileImportButton" data-url="@Url.Action("Execute", "Import", new { area = "Admin", id = Model.Id })" class="btn btn-secondary">
						<i class="fa fa-cogs"></i>
						<span>@T("Common.Import")</span>
					</button>
                }
				@if (Model.LogFileExists)
                {
					<a href="@Url.Action("DownloadLogFile", new { id = Model.Id })" class="btn btn-secondary" target="LogFile">
						<i class="far fa-file-alt"></i>
						<span>@T("Admin.Configuration.ActivityLog")</span>
					</a>
                }
				<button type="submit" name="save" value="save" class="btn btn-primary">
					<i class="fa fa-check"></i>
					<span>@T("Admin.Common.Save")</span>
				</button>
				<button type="submit" name="save" value="save-continue" class="btn btn-secondary">
					<span>@T("Admin.Common.SaveContinue")</span>
				</button>
				<button type="submit" name="import-profile-delete" id="import-profile-delete" value="import-profile-delete" class="btn btn-danger">
					<i class="far fa-trash-alt"></i>
					<span>@T("Admin.Common.Delete")</span>
				</button>
			</div>
		</div>
		@{ Html.RenderPartial("_Update", Model); }
	</fieldset>
}
@Html.DeleteConfirmation("import-profile-delete")